package beyjava.view;

import java.util.Vector;
import beyjava.model.Activity;
import beyjava.model.Person;
import beyjava.model.Project;
import beyjava.model.Task;
import beyjava.util.Common;

/**
 * @author BEYJAVA
 *
 */
public class ReportMenu {
	/**
	 * @param projects
	 * @param activies
	 * @param tasks
	 * @param resource
	 */
	public void reportProjectToConsole(Vector<Project> projects,Vector<Activity> activies ,Vector<Task> tasks,Vector<Person> resource){
	    System.out.println("SYSTEM PROJECTS:");
		for(Project project : projects){
			System.out.println(project.getProjectID().toString()+" , "+project.getProjectName()+" , "+
					project. getProjectDesc()+" , " +Common.convertDateToStringFormat(project.getProjectStartDate(),"dd-MM-yyyy"));
		}
		System.out.print("\n \n");
		System.out.println("SYSTEM ACTIVITIES:");
		for(Activity act : activies){
			System.out.println(act.getActNumber().toString()+" , "+act.getActDesc()+" , "+
					Common.convertDateToStringFormat(act.getActStartDate(),"dd-MM-yyyy")+" , "+
					act.getActDeliver()+" , "+act.getHours().toString()+" , "+act.getActivityProject().getProjectID().toString());
		}
		System.out.print("\n \n");
		System.out.println("SYSTEM TASKS:");
		for(Task task : tasks){
			System.out.println(task.getTaskNumber().toString()+" , "+task.getTaskDesc()+" , "+
					Common.convertDateToStringFormat(task.getTaskStartDate(),"dd-MM-yyyy")+" , "+
					task.getTaskHours().toString()+" , "+task.getActOfTask().getActNumber().toString());
		}
		System.out.print("\n \n");
		System.out.println("SYSTEM RESOURCES:");
		for(Person p : resource){
			System.out.println( p.getPersonID().toString()+" , "+p.getPersonName()+" , "+p.getPersonGender()+" , "+
					p.getResourceType());
		}
		System.out.println("");
	}
}
